package com.demo.test.controller;

import com.demo.test.entity.Winner;
import com.demo.test.service.IWinnerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author XieHuan
 * @since 2017-06-13
 */
@Controller
@RequestMapping("/winner")
public class WinnerController {

    @Autowired
    private IWinnerService iWinnerService;

    @RequestMapping("/allWinners")
    @ResponseBody
    public List<Winner> allSing(){
        List<Winner>  list=iWinnerService.selectWinnerOrderByPiao();
        return  list;
    }

	
}
